//
//  SRAppNoneView.m
//  StockpdfReading
//
//  Created by mac on 2017/7/25.
//  Copyright © 2017年 上海LOL信息技术服务有限公司. All rights reserved.
//

#import "SRAppNoneView.h"

@interface SRAppNoneView ()

@end


@implementation SRAppNoneView

-(instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        [self setupUI];
    }
    return self;
}


-(void)setupUI{
    self.backgroundColor = [UIColor whiteColor];
    self.layer.cornerRadius = 5;
    self.clipsToBounds = YES;
    
    UIImageView *imageView = [[UIImageView alloc]init];
    [self addSubview:imageView];
    imageView.image = [UIImage imageNamed:@"none"];
    [imageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.height.mas_equalTo(100);
        make.centerX.equalTo(self);
        make.top.equalTo(self).offset(159*ScaleY);
        make.width.mas_equalTo(137);
    }];
    
    UILabel *textLabel = [UILabel wy_labelWithText:@"-------" regularFontWithSize:12 color:UIColorFromRGB(0x7c7a7a)];
    [self addSubview:textLabel];
    textLabel.tag = 10086;
    textLabel.textAlignment = NSTextAlignmentCenter;
    [textLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.equalTo(self);
        make.top.equalTo(imageView.mas_bottom).offset(10);
        make.height.mas_equalTo(@16.5);
    }];
}


#pragma mark ----

-(void)setTipstring:(NSString *)tipstring{
    UILabel *tiplabel = (UILabel *)[self viewWithTag:10086];
    tiplabel.text = tipstring;
}




@end
